<!DOCTYPE html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title>新建咨询单</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="/static/css/font.css">
        <link rel="stylesheet" href="/static/css/xadmin.css">
		<link rel="stylesheet" href="/static/css/table.css">
        <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="/static/js/xadmin.js"></script>
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
        <style>
            .ul-one{text-align: center;display: inline-block;overflow: auto;font-size:16px;}
            .ul-one li{display: inline;float: left;border:1px solid rgb(22, 86, 88);border-left:none;padding:10px;min-width:80px;}
            .ul-one li:first-child{border-left:1px solid rgb(22, 86, 88);}
            .fl-title{font-size:18px;color: #fff;line-height: 40px;text-align: center;}
            .bold{font-weight:bold;}
            .clear{clear:both} 
        </style>
    </head>
    <body>
        <div class="x-nav">
          <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
        </div>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-tab">
                              <ul class="layui-tab-title">
                                <li class="layui-this">产品分类</li>
                                <li>产品品牌</li>
                                <li>产品内存</li>
                                <li>产品属性</li>
                                <li>产品颜色</li>
                              </ul>
                              <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <div class="layui-tab-content">
                                         <div class="fl-title order_table">产品分类</div>
                                         <ul class="ul-one bold">
                                            {volist name="fuji" id="vo"}
                                            <li onclick="cate({$vo.category_id},'{$vo.category_name}')">{$vo.category_name}</li>
                                            {/volist}
                                         </ul>
                                         <div class="fl-title order_table">产品子分类</div>
                                         <div style="width:100%;">
                                            <div style="width:80%;float:right;">
                                                <ul class="ul-one" id="cpzcate">
                                                    {volist name="zijidiyige" id="vo"}
                                                    <li>{$vo.category_name}</li>
                                                    {/volist}
                                                 </ul>
                                            </div>
                                            <div style="width:13%;border:1px solid rgb(22, 86, 88);font-size:16px;border-right:none;float:right;text-align:center;padding:10px;" id="fnamea">{$fuji[0]['category_name']}</div>
                                            <div class="clear"></div>
                                         </div>
                                     </div>
                                </div>
                                <div class="layui-tab-item">
                                    <div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
                                      <ul class="order_table">
                                        <li>产品品牌</li>
                                      </ul>
                                      <div class="layui-tab-content">
                                         <ul class="ul-one">
                                            {volist name="pingpai" id="vo"}
                                            <li>{$vo}</li>
                                            {/volist}
                                         </ul>
                                      </div>
                                    </div>
                                </div>
                                <div class="layui-tab-item">
                                    <div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
                                      <ul class="order_table">
                                        <li>产品内存</li>
                                      </ul>
                                      <div class="layui-tab-content">
                                         <ul class="ul-one">
                                            {volist name="neicun" id="vo"}
                                            <li>{$vo}</li>
                                            {/volist}
                                         </ul>
                                      </div>
                                    </div>
                                </div>
                                <div class="layui-tab-item">
                                    <div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
                                      <ul class="order_table">
                                        <li>产品属性</li>
                                      </ul>
                                      <div class="layui-tab-content">
                                         <ul class="ul-one">
                                            {volist name="shuxing" id="vo"}
                                            <li>{$vo}</li>
                                            {/volist}
                                         </ul>
                                      </div>
                                    </div>
                                </div>
                                <div class="layui-tab-item">
                                    <div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
                                      <ul class="order_table">
                                        <li>产品颜色</li>
                                      </ul>
                                      <div class="layui-tab-content">
                                         <ul class="ul-one">
                                            {volist name="yanse" id="vo"}
                                            <li>{$vo}</li>
                                            {/volist}
                                         </ul>
                                      </div>
                                    </div>
                                </div>
                              </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div> 
        <script>
            function cate(id,name)
            {
                var params = {};
                params.id = id+','+name;
                $.ajax({
                    type: "POST",
                    url: "/admin/Category/catego.html",
                    cache: false, //禁用缓存
                    data: params, //传入组装的参数
                    dataType: "json",
                    success: function (result) {
                       console.log(result);
                       $('#fnamea').html(result.fname);
                       var i;
                       var str = '';
                       for(i in result.data)
                       {
                         str += '<li>'+result.data[i].category_name+'</li>';
                       }
                       $('#cpzcate').html(str);
                    },
                    error:function () {
                        parent.layer.msg('网络错误', {icon: 5});
                    }
                })
            }
        </script>
    </body>
</html>